<img src="index/top.jpg" width="100%">
<div id="divContainer">
  <div id="divHeader">
			<div id="divBanner">
			<embed src="flash/banner.swf" quality="high" type="application/x-shockwave-flash" wmode="transparent" width="1024" height="220" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always"></embed>
			</div>

			<div id="divMenu">
	<ul>
			 <?php
			 $queryParent = mysql_query("SELECT idMenu,nameMenu,linkMenu,titleMenu FROM mainmenu 
WHERE isPublished = '1' order by vitri ASC "); $i=0;
        while($pr = mysql_fetch_assoc($queryParent))
        {
          ?>
                <li>
                     <a href="<?php echo $pr['linkMenu']; ?>" title="<?php echo $pr['titleMenu']; ?>" class="<?php echo $a[$i]; ?>" ><b> 
            <?php echo $pr['nameMenu']; ?></b></a>
                </li>
        <?php $i++;
                        
        } // end menu parent
        ?>

			<span style="float: right; padding-left:50px; padding-bottom: 7px;">
			<form action ="timkiem.php" method = "post">
			<input type="text" name="txtWord" />
			<input type="submit" class="css" value="Tìm kiếm" name="btnSearch" />
			<img src="index/shopping_cart.png" width="25" height="25" style='vertical-align: auto'>
            <?php
			 $ok=1;
 if(isset($_SESSION['DT']))
 {
  foreach($_SESSION['DT'] as $k=>$v)
  {
   if(isset($v))
   {
   $ok=2;
   }
  }
 }
 if ($ok != 2)
  {
  echo '<font size="2" color="#CCFF00" > 0 </font>';
 } else {foreach($_SESSION['DT'] as $key=>$value)
   {
    $item[]=$key;
   }
   $str=implode(",",$item);
   $connect=mysql_connect("localhost","root","") or die("Can not connect database");
   mysql_select_db("dtdd",$connect);
   mysql_query("SET NAMES 'utf8'", $connect);// tiếng việt
   $query=mysql_query("select * from sanpham where MaSP in ($str)");
   $total = "";
   $id = "";
   $items = 0;
   while($row=mysql_fetch_array($query))
   {
	   $id  = $row[0];
  $items += $_SESSION['DT'][$id];
   }
  echo ' <a class ="gh" href="DT.php">Giỏ hàng có '.($items).' sản phẩm.</a>' ;
 }?>
			</span>
						      
  </ul>
  </form>
    </div>
  </div>
			
		<div class="clr"></div>
		